
{% extends "base.html" %} 

{% block content %}
<div class="wrapper wrapper-content animated fadeInRight col-sm-6">
    <h1 id="grp-admin-title">执行临时任务</h1>
    </br>
   
    {% if error_message %}
    <div class="alert alert-danger text-center">{{ error_message }}</div>
    {% endif %}
   
    <form id="edit"  name="edit"  enctype="multipart/form-data" action=""  method="post"  class="form-horizontal">
    {% csrf_token %}
   
	    <table class="table table-striped table-bordered table-hover "  id="editable" >
	        <tbody>
	            <tr>
	                <th>名称</th>
	                <td>
			            <input type="text" name="name" class="" placeholder="任务名称" required="length[2~32]">
			        </td>
	            </tr>
	            
                <tr>
                    <th>主机组</th>
			        <td>
			            <select multiple id="inve_group" name="inve_group">
                        {% for group in group_list %}
			            <option id="{{ group }}" value="{{ group }}">{{ group }}</option>
                        {% endfor %}
			            </select>
			        </td>
                </tr>
	            
                <tr>
                    <th>模块</th>
                    <td>
                        <input type="text" name="module" class="" placeholder="ansible模块名" required="length[2~32]">
                    </td> 
                </tr>
	            
                <tr>
                    <th>参数</th>
                    <td>
                        <input type="text" name="argv" class="" placeholder="ansible模块参数" required="length[2~32]">
                    </td> 
                </tr>
	            
                <tr>
                    <th>描述</th>
                    <td>
                        <textarea name="describe" cols="100" rows="2">{{ describe }}</textarea>
                    </td> 
                </tr>
                
	            
	        </tbody>
	    </table>

        <button type="submit" class="btn btn-sm btn-primary">执行</button>
    </form>

    </br>
    <a href="/report/list?force=True"><button type="button" class="btn btn-sm btn-primary" >返回</button></a>
</div>
{% endblock%}
